package com.jlcindia;

public class OOPTest34 {
	public static void main(String args[]){
		Student11 st =new Student11();
		st.name="manish";
		//st.age=25;
		System.out.println("name:"+st.name);
		//System.out.println("age:"+st.age);
		System.out.println("age:"+st.getAge());
		System.out.println();
		Student11 st2 =new Student11(23);
		Student11 st3 =new Student11(45);
		st2.name="rahul";
		st3.name="mannoj";
		System.out.println("st2.name:"+"\t"+st2.name+"\t"+st2.getAge());
		System.out.println("st3.name:"+"\t"+st3.name+"\t"+st3.getAge());
		st2.showData();
		}
}
class Person11 {
	private int age ;
	String name;
	
	Person11(int age){
		this.age=age;
	}
	Person11(){}
    int getAge(){
		return this.age;
	}
}
class Student11 extends Person11{
	
	Student11(int age){
		super(age);
	}
	Student11(){}
	
	void showData(){
		System.out.println("name:"+name);
		//System.out.println("age:"+age);
		//System.out.println("age:"+this.age);
		//System.out.println("age:"+super.age);
		System.out.println("age:"+getAge());
	}
}


